package cn.wolfcode.mapper;

import cn.wolfcode.domain.Role;
import cn.wolfcode.util.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    void deleteByPrimaryKey(Long id);

    void insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    void updateByPrimaryKey(Role record);

    List<Role> queryForList(QueryObject qo);

    List<Role> selectByEmpId(Long id);
    // 批量保存中间表
    void insertAllRelation(@Param("rId") Long id, @Param("ids") Long[] ids);
    // 根据id删除角色所有关联的权限sql
    void deleteRelation(Long rId);
}